<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopSalesman extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_salesman', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('shopid')->unique()->comment('商家id');
            $table->integer('cityid')->default(1)->comment('城市id');
            $table->string('type')->comment('类型:普通地推/地推合伙人');
            $table->decimal('payfee', 16,2)->comment('缴纳金额');
            $table->integer('contractmonth')->comment('合约时间');
            $table->date('contractstarttime')->comment('合约开始时间');
            $table->date('contractlasttime')->comment('合约截止时间');
            $table->integer('commonregisternum')->comment('普通注册数');
            $table->integer('partnerregisternum')->comment('合伙人注册数');
            $table->integer('ordernum')->comment('订单数');
            $table->integer('validordernum')->comment('有效订单数');
            $table->decimal('totalorderamount', 16, 2)->default(0.00)->comment('订单总金额');
            $table->decimal('getmoney', 16, 2)->default(0.00)->comment('获取金钱总数');
            $table->decimal('withdrawalmoney',16, 2)->comment('已提现金额');
            $table->decimal('balance', 16, 2)->comment('余额');
            $table->integer('status')->comment('状态');
            $table->string('adminname',32)->comment('商务人员名称');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
